﻿<UserControl x:Class="Coding4Fun.BoxingBots.UserConsole.ringAvatar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <!--<Canvas Width="445" Height="421">-->
        <Canvas Width="610" Height="610">

            <!--
            <TextBlock x:Name="txtOut" Text="0" Foreground="Lime" Width="445" TextAlignment="Center" FontSize="28" FontWeight="Bold" 
                   Canvas.Left="0" Canvas.Top="-100" TextWrapping="Wrap" Height="400" />
-->
        <Grid Width="450" Height="450" Canvas.Left="80" Canvas.Top="80">

            <Viewport3D x:Name="viewport" RenderOptions.CachingHint="Cache" ClipToBounds="True">
                <!--
                <Viewport3D.Effect>
                        <DropShadowEffect Color="#FF8AF8D0" BlurRadius="8" Opacity=".9" Direction="0" ShadowDepth="0"/>
                </Viewport3D.Effect>
                -->
                <Viewport3D.Camera>
                    <PerspectiveCamera x:Name="viewportCamera" 
                                   Position="0,0,0" LookDirection="0,0,-1"
                                   UpDirection="0,1,0" FieldOfView="45"
                                   FarPlaneDistance="200" NearPlaneDistance="1" >
                        <PerspectiveCamera.Transform>
                            <TranslateTransform3D x:Name="cameraTranslate" OffsetX="0" OffsetY="0" OffsetZ="8"/>
                        </PerspectiveCamera.Transform>
                    </PerspectiveCamera>
                </Viewport3D.Camera>

                <ModelVisual3D x:Name="viewportLights">
                    <ModelVisual3D.Content>
                        <Model3DGroup>
                            <AmbientLight x:Name="ambientLight" Color="#666666"/>
                            <DirectionalLight x:Name="directionalLight" Color="#444444" Direction="0 -1 -1"/>
                            <SpotLight x:Name="spotLight" Color="#666666" Direction="0 0 -1" InnerConeAngle="30" OuterConeAngle="60" Position="0 1 30" />
                            <!--<PointLight x:Name="pointLight" Color="#444444" Position="1,.7,-2" Range="2"/>-->
                        </Model3DGroup>
                    </ModelVisual3D.Content>
                </ModelVisual3D>

                <ModelVisual3D x:Name="viewportModelsContainer2">
                    <ModelVisual3D.Transform>
                        <Transform3DGroup>
                            <RotateTransform3D x:Name="bodyRotationCenter" CenterX="0" CenterY="0" CenterZ="0">
                                <RotateTransform3D.Rotation>
                                    <AxisAngleRotation3D x:Name="myAngleRotation" Axis="0,1,0" Angle="-40"/>
                                </RotateTransform3D.Rotation>
                            </RotateTransform3D>
                        </Transform3DGroup>
                    </ModelVisual3D.Transform>
                </ModelVisual3D>

                <ContainerUIElement3D x:Name="viewportModelsContainer">
                    <ContainerUIElement3D.Transform>
                        <Transform3DGroup>
                            <RotateTransform3D x:Name="bodyRotationCenter2" CenterX="0" CenterY="0" CenterZ="0">
                                <RotateTransform3D.Rotation>
                                    <AxisAngleRotation3D x:Name="myAngleRotation2" Axis="0,1,0" Angle="-60"/>
                                </RotateTransform3D.Rotation>
                            </RotateTransform3D>
                        </Transform3DGroup>
                    </ContainerUIElement3D.Transform>
                </ContainerUIElement3D>

            </Viewport3D>
        </Grid>

        <!--

        <Image x:Name="ImgBKG" Source="Images/ringAvatarOff.png"/>
        
        <Canvas x:Name="ImagesToClip">
            <Canvas.OpacityMask>
                <VisualBrush Visual="{Binding ElementName=allPaths}" Viewbox="0,0,1.0,1.0"/>
            </Canvas.OpacityMask>
            <Image x:Name="ImgOn" Height="421" Source="Images/ringAvatarOn.png" Stretch="Fill" Width="445" />
        </Canvas>
        <Canvas x:Name="allPaths" Width="445" Height="421" Canvas.Left="0" Background="#01000000" ClipToBounds="True">

        <Canvas x:Name="allPaths" Width="618" Height="618" Canvas.Left="0" ClipToBounds="True">
                <Path x:Name="path_PunchRight" Canvas.Left="309" Canvas.Top="309">
                <Path.RenderTransform>
                    <TransformGroup>
                        <RotateTransform Angle="21.5"/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Data>
                    <PathGeometry>
                        <PathFigure x:Name="figure_punchRightOuter"/>
                        <PathFigure x:Name="figure_punchRightMiddle"/>
                        <PathFigure x:Name="figure_punchRightInner"/>
                    </PathGeometry>
                </Path.Data>
                <Path.Fill>
                    <SolidColorBrush Color="#05ebb7"/>
                </Path.Fill>
            </Path>


            <Path x:Name="path_PunchLeft" Canvas.Left="309" Canvas.Top="309">
                <Path.RenderTransform>
                    <TransformGroup>
                        <RotateTransform Angle="21.5"/>
                        <ScaleTransform ScaleX="-1.0"/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Data>
                    <PathGeometry>
                        <PathFigure x:Name="figure_punchLeftOuter"/>
                        <PathFigure x:Name="figure_punchLeftMiddle"/>
                        <PathFigure x:Name="figure_punchLeftInner"/>
                    </PathGeometry>
                </Path.Data>
                <Path.Fill>
                    <SolidColorBrush Color="#05ebb7"/>
                </Path.Fill>
            </Path>
                        -->

        <!--
        <Canvas Canvas.Left="224" Canvas.Top="200" RenderTransformOrigin="0.0,0.0">
            <Canvas.RenderTransform>
                <RotateTransform x:Name="torsoTopAngle" Angle="90"/>
            </Canvas.RenderTransform>
            <Rectangle Width="13" Height="10" Fill="White" Canvas.Left="163" Canvas.Top="-5"/>
        </Canvas>

        <Canvas Canvas.Left="224" Canvas.Top="200" RenderTransformOrigin="0.0,0.0">
            <Canvas.RenderTransform>
                <RotateTransform x:Name="torsoBottomAngle" Angle="90"/>
            </Canvas.RenderTransform>
            <Rectangle Width="13" Height="10" Fill="White" Canvas.Left="187" Canvas.Top="-5"/>
        </Canvas>
    </Canvas>
    -->

            <!--
    <Canvas Canvas.Left="224" Canvas.Top="338">
            <Canvas.RenderTransform>
                <TranslateTransform x:Name="barBodyFrontBack" Y="0"/>
            </Canvas.RenderTransform>
            <Rectangle Fill="White" Width="80" Canvas.Left="-40" Canvas.Top="-1" Height="2"/>
            <Rectangle Fill="White" Width="2" Canvas.Left="-1" Canvas.Top="-8" Height="16">
                <Rectangle.RenderTransform>
                    <TranslateTransform x:Name="barBodyLeftRight" X="0"/>
                </Rectangle.RenderTransform>
            </Rectangle>
        </Canvas>
-->
            
        <Canvas x:Name="canvasTopDown" Canvas.Left="304" Canvas.Top="627">
            <Image x:Name="imgTopDown" Source="Images/topDown.png" Width="17" Height="18" Canvas.Left="-3" Canvas.Top="-9" RenderTransformOrigin=".5,.66">
                <Image.RenderTransform>
                    <TransformGroup>
                        <RotateTransform x:Name="tdRotate" Angle="0"/>
                        <TranslateTransform x:Name="tdTranslate" X="0" Y="0"/>
                        <ScaleTransform x:Name="tdScale" ScaleX="0.6" ScaleY="0.6"/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>

        <Canvas Canvas.Left="309" Canvas.Top="312" RenderTransformOrigin="0.0,0.0">
            <Canvas.RenderTransform>
                <RotateTransform x:Name="shoulderRightAngle" Angle="24"/>
            </Canvas.RenderTransform>
            <Rectangle Width="12" Height="2" Fill="White" Canvas.Left="180" Canvas.Top="-1"/>
        </Canvas>

        <Canvas Canvas.Left="309" Canvas.Top="312" RenderTransformOrigin="0.0,0.0">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <RotateTransform x:Name="shoulderLeftAngle" Angle="24"/>
                    <ScaleTransform ScaleX="-1"/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Rectangle Width="12" Height="2" Fill="White" Canvas.Left="180" Canvas.Top="-1"/>
        </Canvas>

    </Canvas>
</UserControl>
